package com.sca.service;

import com.sca.service.factor.ProviderFallbackFactor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//定义远程服务接口contextId 用于区分服务调用 因为我们以后的服务会很多的调用接口
@FeignClient(name = "sca-provider",
        contextId = "remoteProviderService",
        fallbackFactory= ProviderFallbackFactor.class)//name值是nacos的服务名
public interface RemoteProviderService {
    @GetMapping("/provider/echo/{msg}")
    public String EchoMsg(@PathVariable String msg);
}
